import Vue from "vue";

import "normalize.css/normalize.css"; // A modern alternative to CSS resets
import "element-ui/lib/theme-chalk/index.css";

import "@/styles/index.scss"; // global css

import App from "./App";
import store from "./store";
import router from "./router";

import "@/icons"; // icon
import "@/permission"; // permission control

import Element from "element-ui"; // 引用饿了么组件
import type from "@/utils/type"; // 引用自己定义的函数
Vue.use(type);
import update from "@/utils/update"; // 引用自己定义的上传文件函数
Vue.use(update);
import resize from "@/utils/resize"; // 引用自己定义的上传文件函数
Vue.use(resize);

import i18n from "./lang"; // 引用i8n语言包

Vue.use(Element, {
  size: "small", // set element-ui default size
  i18n: (key, value) => i18n.t(key, value)
});

Vue.config.productionTip = false;

new Vue({
  el: "#app",
  router,
  store,
  i18n,
  render: h => h(App)
});
